I would suggest supporting RISC OS 3.10 properly as it saves you lots of
faff. Although more entry points may be needed, the effort to provide full
functionality (directory setting, processing of ^.s in paths and the such)
is much reduced as it is handled mostly by FileSwitch. I would recommend the
following settings (assuming a network flavour filing system).

Filing system information word:

Bit     Setting Meaning
31      ?       If set you suport special fields - probably want this clear
30      0       Streams aren't interactive (information bit only)
29      0       Null length file names are not allowed
28      0       Don't allow an open call if the file doesn't exist
27      0       Don't tell the filing system about flush calls (may want 1 instead)
26      0       FSEntry_File 9 (read info, no length) not provided
25      0       FSEntry_Func 20 (*FileInfo) not provided
24      0       FSEntry_Func 18 (set contexts) not provided
23      1       MultiFS extensions supported
22      0       Paths always given to filing system from $. onwards
21      0       FileSwitch stores directory settings (*Dir, *Lib etc) for this filing system
20      1       FileSwitch does *Load with Open, GBPB, close
19      1       FileSwitch does *Save with Open, GBPB, close
18      0       FileSwitch should process *Access strings itself
17      0       No extra info word
16      0       Filing system isn't read only
15-8    ?       Limit on number of open files - 0 for no limit
7-0     ?       Your filing system's number

The following Filing system entry points will be used:

FSEntry_Open
        0       read
        2       update

        Return when a file is opened with the file information word set to:

        Bit     Setting Meaning
        31      ?       Write permitted to file - return as appropriate
        30      ?       As above, for Read
        29      0       Object isn't a directory
        28      0       Buffered GBPB only
        27      0       Stream isn't interractive

        And quote a buffer size which is a power of 2 (256 bytes?) and the
        length of the file. If you can get the allocate space too then
        return that, otherwise round up the file's size to the next multiple
        of the buffer size and return that.

        These settings mean the following interfaces will be used:

FSEntry_GetBytes
FSEntry_PutBytes

        These will be the multiple byte varieties. You will be asked to read
        beyond the file's end - simply read to the file's end and don't
        return an error. This happens as FileSwitch thinks it's driving a
        disc-based filing system and reads the half-filled block at a
        file's end just before modifying it and writing the whole block
        back.

FSEntry_Args
        3       Write file extent (size) (just before the file is closed
                after modification)
        6       Notify of flush (happens just before close after modification)
        7       Ensure file size - return without error if no appropriate
                action.
        8       Write zeroes
        9       Read file datestamp
        10      ImageStampIs. Return without error as this is only
                appropriate to removable disc based filing systems (FileCore)

FSEntry_File
        1       Write catalogue information
        5       Read catalogue information
        6       Delete object
        7       Create file
        8       Create directory
        *10     ReadBlockSize - error this if you want

FSEntry_Func
        (7      Set filing system options replaced by _Func 28)
        8       Rename
        *10     Boot filing system - do nothing if booting inappropriate
        (11     Read name and boot option of disc replaced by _Func 23 and 27)
        14      Read directory entries
        15      Read directory entries and information
        16      Shutdown
        *17     Print start up banner - depends on entry in FS info block being -1
        *19     Read diretory entries and information - can error this one
        23      CanonicaliseSpecialAndDisc
        *24     Resolve wildcard - return with r4=-1 to get FileSwitch to do this
        *25     ReadDefectList - error this if you want
        *26     AddDefect - error this if you want
        27      ReadBootOption - don't error this, return 0 instead
        28      WriteBootOption - error this, or do nothing, it's up to you
        *29     UsedSpaceMap - error this
        30      ReadFreeSpace - this might be useful to support
        *31     NameDisc - inappropriate for network - error it?
        32      StampImage - don't error this, do an appropriate action, or do nothing
        *33     ObjectAtOffset - error this

Those entries in () are for information only - they won't be called. Those
entries with a * can have trivial implementations.

All paths will be fully canonicalised by FileSwitch before the filing system
gets them, that is where appropriate will include special field (optional
as determined by CanonicaliseSpecialAndDisc and FS infor word bit), disc
name (as determined by CanonicaliseSpecialAndDisc), and path from $. The
filing system need not handle any of:

Directory setting - *Dir, *Lib etc
Parsing paths relative to set directories (@.thing.blah or %.doofa)
Performing catalogue listings of any sort (*Cat, *Ex etc)
Parsing *Access strings
^.s in paths

As these are handled by FileSwitch.

I believe writing such a filing system is less work than the RISC OS 2.00
way where the large gaps in calls used are needed to be supported.

